Integrand size = 19, antiderivative size = 115 \[ \int \frac {\left (a+b x^n\right )^2}{\left (c+d x^n\right )^2} \, dx=-\frac {b (a d-b c (1+n)) x}{c d^2 n}-\frac {(b c-a d) x \left (a+b x^n\right )}{c d n \left (c+d x^n\right )}+\frac {(b c-a d) (a d (1-n)-b c (1+n)) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {d x^n}{c}\right )}{c^2 d^2 n} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {424, 396, 251} \[ \int \frac {\left (a+b x^n\right )^2}{\left (c+d x^n\right )^2} \, dx=\frac {x (b c-a d) (a d (1-n)-b c (n+1)) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {d x^n}{c}\right )}{c^2 d^2 n}-\frac {b x (a d-b c (n+1))}{c d^2 n}-\frac {x (b c-a d) \left (a+b x^n\right )}{c d n \left (c+d x^n\right )} \]
[In]
[Out]
Rule 251
Rule 396
Rule 424
Rubi steps \begin{align*} \text {integral}& = -\frac {(b c-a d) x \left (a+b x^n\right )}{c d n \left (c+d x^n\right )}+\frac {\int \frac {a (b c-a d (1-n))-b (a d-b c (1+n)) x^n}{c+d x^n} \, dx}{c d n} \\ & = -\frac {b (a d-b c (1+n)) x}{c d^2 n}-\frac {(b c-a d) x \left (a+b x^n\right )}{c d n \left (c+d x^n\right )}+\frac {((b c-a d) (a d (1-n)-b c (1+n))) \int \frac {1}{c+d x^n} \, dx}{c d^2 n} \\ & = -\frac {b (a d-b c (1+n)) x}{c d^2 n}-\frac {(b c-a d) x \left (a+b x^n\right )}{c d n \left (c+d x^n\right )}+\frac {(b c-a d) (a d (1-n)-b c (1+n)) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {d x^n}{c}\right )}{c^2 d^2 n} \\ \end{align*}
Time = 0.25 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.83 \[ \int \frac {\left (a+b x^n\right )^2}{\left (c+d x^n\right )^2} \, dx=\frac {x \left (\frac {c \left (-2 a b c d+a^2 d^2+b^2 c \left (c+c n+d n x^n\right )\right )}{c+d x^n}-(b c-a d) (a d (-1+n)+b c (1+n)) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {d x^n}{c}\right )\right )}{c^2 d^2 n} \]
[In]
[Out]
\[\int \frac {\left (a +b \,x^{n}\right )^{2}}{\left (c +d \,x^{n}\right )^{2}}d x\]
[In]
[Out]
\[ \int \frac {\left (a+b x^n\right )^2}{\left (c+d x^n\right )^2} \, dx=\int { \frac {{\left (b x^{n} + a\right )}^{2}}{{\left (d x^{n} + c\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (a+b x^n\right )^2}{\left (c+d x^n\right )^2} \, dx=\int \frac {\left (a + b x^{n}\right )^{2}}{\left (c + d x^{n}\right )^{2}}\, dx \]
[In]
[Out]
\[ \int \frac {\left (a+b x^n\right )^2}{\left (c+d x^n\right )^2} \, dx=\int { \frac {{\left (b x^{n} + a\right )}^{2}}{{\left (d x^{n} + c\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (a+b x^n\right )^2}{\left (c+d x^n\right )^2} \, dx=\int { \frac {{\left (b x^{n} + a\right )}^{2}}{{\left (d x^{n} + c\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (a+b x^n\right )^2}{\left (c+d x^n\right )^2} \, dx=\int \frac {{\left (a+b\,x^n\right )}^2}{{\left (c+d\,x^n\right )}^2} \,d x \]
[In]
[Out]